This file contains 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
type Props<TagName extends keyof JSX.IntrinsicElements | void = void> = { | |
as?: TagName; | |
children?: React.ReactNode; | |
attributes?: Attributes<TagName>; | |
}; | |
export type Attributes<TagName = void, O = void> = Omit< | |
(TagName extends keyof JSX.IntrinsicElements | |
? JSX.IntrinsicElements[TagName] |
This file contains 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 baseUnit = 4; | |
const units = [...Array(30).keys()].reduce( | |
(config, i) => ({ | |
...config, | |
[i + 1]: `${baseUnit * (i + 1)}px`, | |
}), | |
{} | |
); | |
/** @type {import('tailwindcss').Config} */ |
This file contains 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
/* css */ | |
.root { | |
--_p: 4; | |
padding: calc(var(--arcade-unit-x1) * var(--_p)); | |
border-radius: var(--arcade-unit-radius-medium); | |
background: var(--arcade-color-background-elevated); | |
color: var(--arcade-color-foreground-neutral); | |
border: var(--arcade-unit-border-small) solid var(--arcade-color-border-neutral-faded); | |
box-shadow: var(--arcade-shadow-elevated); |
This file contains 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
-Xms128m | |
-Xmx750m | |
-XX:ReservedCodeCacheSize=240m | |
-XX:+UseConcMarkSweepGC | |
-XX:SoftRefLRUPolicyMSPerMB=50 | |
-ea | |
-XX:CICompilerCount=2 | |
-Dsun.io.useCanonPrefixCache=false | |
-Djdk.http.auth.tunneling.disabledSchemes="" | |
-XX:+HeapDumpOnOutOfMemoryError |
This file contains 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 path = require('path'); | |
const fs = require('fs-extra'); | |
const sassExtract = require('sass-extract'); | |
const Handlebars = require('handlebars'); | |
const juice = require('juice'); | |
const templatesPath = path.resolve(__dirname, '../templates/'); | |
const partialsPath = path.resolve(__dirname, '../components/'); | |
const templateNames = fs.readdirSync(templatesPath); |
This file contains 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
export const isRTL = () => !!document.querySelector('[dir=rtl]'); | |
export const isLTR = () => !isRTL(); | |
let cachedScrollType; | |
const getScrollType = () => { | |
if (cachedScrollType) return cachedScrollType; | |
const dummy = window.document.createElement('div'); |
This file contains 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 from 'react'; | |
import { storiesOf } from '@storybook/react'; | |
import Button from 'components/Button'; | |
import Dialog from 'components/Dialog'; | |
import DialogProvider from 'components/Dialog/DialogProvider'; | |
const Story = (props: { position?: 'right' }) => { | |
const modalId = 'testModal'; | |
const { show } = Dialog.use(modalId); |
This file contains 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
class Popover extends React.PureComponent { | |
state = { | |
active: false, | |
visible: false | |
} | |
componentDidMount() { | |
if (this.props.active) { | |
this.show(); | |
} |
This file contains 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 properties: Array<ControlApi> = [{ | |
type: 'text', | |
propertyName: 'textProperty', | |
defaultValue: 'some text', | |
}, { | |
type: 'number', | |
propertyName: 'numberProperty', | |
defaultValue: 2, | |
}, { | |
type: 'boolean', |
NewerOlder