-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mmatheson/disable-side-nav-row
- Loading branch information
Showing
124 changed files
with
4,239 additions
and
1,511 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useState } from 'react'; | ||
import { BannerOverlay, Button, FixedZIndex, Icon } from 'gestalt'; | ||
|
||
export default function Example() { | ||
const [showComponent, setShowComponent] = useState(true); | ||
|
||
return !showComponent ? ( | ||
<Button | ||
onClick={() => { | ||
setShowComponent(true); | ||
}} | ||
text="Show BannerOverlay" | ||
/> | ||
) : ( | ||
<BannerOverlay | ||
message="You can dismiss this banner with the dismiss button!" | ||
offset={{ top: 130, bottom: 24 }} | ||
onDismiss={() => { | ||
setShowComponent(false); | ||
}} | ||
thumbnail={{ | ||
icon: <Icon accessibilityLabel="Sparkle" color="info" icon="info-circle" />, | ||
}} | ||
title="Dismissable Banner" | ||
zIndex={new FixedZIndex(100)} | ||
/> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { useState } from 'react'; | ||
import { BannerOverlay, Button, FixedZIndex, Image, Link, Text } from 'gestalt'; | ||
|
||
export default function Example() { | ||
const [showComponent, setShowComponent] = useState(true); | ||
|
||
return !showComponent ? ( | ||
<Button | ||
onClick={() => { | ||
setShowComponent(true); | ||
}} | ||
text="Show BannerOverlay" | ||
/> | ||
) : ( | ||
<BannerOverlay | ||
message={ | ||
<Text inline> | ||
Discover{' '} | ||
<Link display="inlineBlock" href="#" target="self"> | ||
trending fashion ideas | ||
</Link>{' '} | ||
in the app! | ||
</Text> | ||
} | ||
offset={{ top: 130, bottom: 24 }} | ||
onDismiss={() => { | ||
setShowComponent(false); | ||
}} | ||
primaryAction={{ | ||
role: 'button', | ||
onClick: () => { | ||
setShowComponent(false); | ||
}, | ||
label: 'Get the app', | ||
accessibilityLabel: 'Get the app', | ||
}} | ||
secondaryAction={{ | ||
role: 'button', | ||
onClick: () => {}, | ||
label: 'Not now', | ||
accessibilityLabel: 'Not now', | ||
}} | ||
thumbnail={{ | ||
image: ( | ||
<Image | ||
alt="Pinterest Logo" | ||
naturalHeight={1} | ||
naturalWidth={1} | ||
src="https://i.ibb.co/LQc8ynn/image.png" | ||
/> | ||
), | ||
}} | ||
title="More to Explore" | ||
zIndex={new FixedZIndex(100)} | ||
/> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Box, Checkbox, Flex } from 'gestalt'; | ||
|
||
const noop = () => {}; | ||
|
||
export default function Example() { | ||
return ( | ||
<Box padding={4}> | ||
<Flex direction="column" gap={4} height="100%" width="100%"> | ||
<Checkbox | ||
checked | ||
helperText="Helper Text" | ||
id="Checked sm" | ||
label="Checked" | ||
onChange={noop} | ||
size="sm" | ||
/> | ||
|
||
<Checkbox | ||
checked | ||
helperText="Helper Text" | ||
id="Checked md" | ||
label="Checked" | ||
onChange={noop} | ||
size="md" | ||
/> | ||
</Flex> | ||
</Box> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Box, Checkbox, Flex } from 'gestalt'; | ||
|
||
const noop = () => {}; | ||
|
||
export default function Example() { | ||
return ( | ||
<Box padding={4}> | ||
<Flex gap={8} height="100%" width="100%"> | ||
<Flex direction="column" gap={6}> | ||
<Checkbox | ||
checked={false} | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled sm" | ||
label="Disabled" | ||
onChange={noop} | ||
size="sm" | ||
/> | ||
<Checkbox | ||
checked | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled Checked sm" | ||
label="Disabled Checked" | ||
onChange={noop} | ||
size="sm" | ||
/> | ||
<Checkbox | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled indeterminate sm" | ||
indeterminate | ||
label="Disabled indeterminate " | ||
onChange={noop} | ||
size="sm" | ||
/> | ||
</Flex> | ||
<Flex direction="column" gap={6}> | ||
<Checkbox | ||
checked={false} | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled md" | ||
label="Disabled" | ||
onChange={noop} | ||
size="md" | ||
/> | ||
<Checkbox | ||
checked | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled Checked md" | ||
label="Disabled Checked" | ||
onChange={noop} | ||
size="md" | ||
/> | ||
<Checkbox | ||
disabled | ||
helperText="Helper Text" | ||
id="Disabled Indeterminate md" | ||
indeterminate | ||
label="Disabled indeterminate" | ||
onChange={noop} | ||
size="md" | ||
/> | ||
</Flex> | ||
</Flex> | ||
</Box> | ||
); | ||
} |
Oops, something went wrong.