-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs([DST-498]): revise
Button
page (#4045)
* planning * first example * save * full width * cleanup * align with table blueprint * remove variants add anatomy * add label demo * more stuff * save * save * add disbled demo * done! * add updated badge * vie -> compete * area -> section * remove sentence * adjustments * add general usage * fix link to tooltip * clarification * updates! * more updates * fix typo * add on press example adn related
- Loading branch information
Showing
17 changed files
with
290 additions
and
114 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
docs/content/components/form/button/button-disabled.demo.tsx
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,11 @@ | ||
import { Button, Stack, Text } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<Stack space={1} alignX="left"> | ||
<Button disabled>Add discount code</Button> | ||
<Text color="text-base-disabled" fontSize="xs"> | ||
Only Fanclub members can add a discount code. If you're a Fanclub member, | ||
please log in first. | ||
</Text> | ||
</Stack> | ||
); |
4 changes: 2 additions & 2 deletions
4
...mponents/form/button/button-link.demo.tsx → ...ts/form/button/button-full-width.demo.tsx
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Button } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<Button as="a" variant="primary" href="/rx-logo.png" download> | ||
Download Logo | ||
<Button variant="primary" fullWidth> | ||
Proceed to checkout | ||
</Button> | ||
); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { Button, Inline } from '@marigold/components'; | ||
import { Ticket } from '@marigold/icons'; | ||
import { Edit } from '@marigold/icons'; | ||
|
||
export default () => ( | ||
<Inline space={2}> | ||
<Inline space={5} alignY="center" alignX="center"> | ||
<Button variant="primary">Edit</Button> | ||
<Button variant="primary"> | ||
<Ticket /> Icon Primary | ||
<Edit size={16} /> Edit | ||
</Button> | ||
<Button variant="primary" disabled> | ||
<Ticket /> Icon Primary | ||
<Button variant="icon" aria-label="Edit"> | ||
<Edit /> | ||
</Button> | ||
</Inline> | ||
); |
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,27 @@ | ||
import { useState } from 'react'; | ||
import { Button, Stack, Text } from '@marigold/components'; | ||
|
||
export default () => { | ||
const [pointerType, setPointerType] = useState(''); | ||
const [count, setCount] = useState(0); | ||
|
||
return ( | ||
<Stack space={3} alignX="left"> | ||
<Button | ||
variant="secondary" | ||
onPress={() => setCount(count + 1)} | ||
onPressStart={e => setPointerType(e.pointerType)} | ||
onPressEnd={() => setPointerType('')} | ||
> | ||
Press me | ||
</Button> | ||
<Text> | ||
Number of times presse: {count} ( | ||
{pointerType | ||
? `Button is pressed via ${pointerType}.` | ||
: 'Button not pressed.'} | ||
) | ||
</Text> | ||
</Stack> | ||
); | ||
}; |
10 changes: 0 additions & 10 deletions
10
docs/content/components/form/button/button-primary.demo.tsx
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
docs/content/components/form/button/button-secondary.demo.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.