This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--black: #000; | |
--white: #fff; | |
--rose-50: #fff1f2; | |
--rose-100: #ffe4e6; | |
--rose-200: #fecdd3; | |
--rose-300: #fda4af; | |
--rose-400: #fb7185; | |
--rose-500: #f43f5e; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
font-family: var(--default-font-family); | |
/* font-size: 1.125rem; */ | |
font-size: calc(1rem + 0.333vw); | |
} | |
html, body { | |
height: 100%; | |
width: 100%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useReducer } from 'react'; | |
import { Form } from 'components/form'; | |
import { Button } from 'components/button/newButton'; | |
import { dataMapToObj } from 'components/formHelpers'; | |
import { addImport } from './importMergeHelpers'; | |
import { update, isNil, remove } from 'ramda'; | |
import './importMerge.css'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useReducer } from 'react'; | |
const reducer = (state, action) => { | |
switch (action.type) { | |
case 'removeEntry': { | |
const newEntries = remove(action.payload, 1, state.entries); | |
return { ...state, entries: newEntries, editIndex: null }; | |
} | |
case 'saveEntry': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function warn(a, b) { | |
console.warn(a, b); | |
} | |
export default guard( [ a => true , b => false ], () => true )( warn ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defp atomize_map(%{} = stringy_map) do | |
stringy_map | |
|> Map.new(fn {k, v} -> {String.to_atom(k), v} end) | |
end | |
defp atomize_map(_) do | |
%{} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.content-box { | |
--content-box-border-color: #ccc; | |
border: 1px solid; | |
border-color: var(--content-box-border-color); | |
border-radius: .4rem; | |
} | |
.content-row-headline { | |
display: block; | |
padding: 1.5rem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertToNumber(value) { | |
const asNumber = parseFloat(value); | |
return Number.isNaN(asNumber) ? 0 : asNumber; | |
} | |
function getNodeZIndex(node) { | |
const computedIndex = convertToNumber(window.getComputedStyle(node).zIndex); | |
const styleIndex = convertToNumber(node.style.zIndex); | |
if (computedIndex > styleIndex) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const persooMachine = Machine({ | |
id: "persoo", | |
initial: "initialize", | |
states: { | |
initialize: { | |
type: "parallel", | |
states: { | |
waitForPersooJS: { | |
initial: "fetching", | |
states: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { cond, always, T, whereEq } from "ramda"; | |
export const getProductPrice = cond([ | |
[ | |
whereEq({ | |
type: "product1", | |
currency: "czk", | |
}), | |
({ price }) => `${price} Kc`, | |
], |