-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2443 from coingaming/develop
Moon 10.10.2
- Loading branch information
Showing
81 changed files
with
18,459 additions
and
8,956 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Buttons allow users to take actions, and make choices, with a single tap. | ||
|
||
Buttons communicate actions that users can take. They are typically placed throughout your UI, in places like: | ||
|
||
Modal windows | ||
Forms | ||
Cards | ||
Toolbars |
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,18 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Animations = () => ( | ||
<> | ||
<Button animation="progress" variant="outline"> | ||
Progress | ||
</Button> | ||
<Button animation="success" variant="outline"> | ||
Success | ||
</Button> | ||
<Button animation="error" variant="outline"> | ||
Error | ||
</Button> | ||
<Button animation="pulse" variant="outline"> | ||
Pulse | ||
</Button> | ||
</> | ||
); |
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,3 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Default = () => <Button>Default</Button>; |
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,3 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Disabled = () => <Button disabled>Disabled</Button>; |
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,8 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
import { OtherFrame } from '@heathmont/moon-icons-tw'; | ||
|
||
export const FullWidth = () => ( | ||
<Button iconRight={<OtherFrame />} fullWidth> | ||
Full width | ||
</Button> | ||
); |
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,9 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
import { OtherFrame } from '@heathmont/moon-icons-tw'; | ||
|
||
export const Icons = () => ( | ||
<> | ||
<Button iconLeft={<OtherFrame />}>IconLeft</Button> | ||
<Button iconRight={<OtherFrame />}>IconRight</Button> | ||
</> | ||
); |
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,12 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Multiline = () => ( | ||
<Button size="xl" className="py-3"> | ||
<span className="flex flex-col gap-1"> | ||
<span className="leading-none">Button text</span> | ||
<span className="text-moon-9 font-normal leading-[12px]"> | ||
Placeholder text | ||
</span> | ||
</span> | ||
</Button> | ||
); |
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 from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Sizes = () => ( | ||
<> | ||
<Button size="xs">Size XS</Button> | ||
<Button size="sm">Size SM</Button> | ||
<Button>Default size MD</Button> | ||
<Button size="lg">Size LG</Button> | ||
<Button size="xl">Size XL</Button> | ||
</> | ||
); |
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,9 @@ | ||
import Button from '@heathmont/moon-base-tw/lib/button/Button'; | ||
|
||
export const Variants = () => ( | ||
<> | ||
<Button>Default is Fill</Button> | ||
<Button variant="outline">Outline</Button> | ||
<Button variant="ghost">Ghost</Button> | ||
</> | ||
); |
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,64 @@ | ||
import { Animations } from '@/app/components/server/button/examples/Animations'; | ||
import { Default } from '@/app/components/server/button/examples/Default'; | ||
import { Disabled } from '@/app/components/server/button/examples/Disabled'; | ||
import { FullWidth } from '@/app/components/server/button/examples/FullWidth'; | ||
import { Icons } from '@/app/components/server/button/examples/Icons'; | ||
import { Multiline } from '@/app/components/server/button/examples/Multiline'; | ||
import { Sizes } from '@/app/components/server/button/examples/Sizes'; | ||
import { Variants } from '@/app/components/server/button/examples/Variants'; | ||
import ExampleSection from '@/app/components/shared/ExampleSection'; | ||
import QuickNav from '@/app/components/shared/QuickNav'; | ||
import { getExamples } from '@/app/utils/getExamples'; | ||
import { MDX } from '@/components/MDX'; | ||
|
||
export default async function Home() { | ||
const { server } = await getExamples(); | ||
const examplesList = Object.keys(server.button.examples); | ||
return ( | ||
<div className="w-full max-w-7xl flex flex-col gap-4 text-moon-14"> | ||
<h1 className="font-medium text-moon-32">Button</h1> | ||
<MDX markdown={server.button.description} /> | ||
<QuickNav items={examplesList} /> | ||
<ExampleSection | ||
title="Default" | ||
component={<Default />} | ||
code={server.button.examples.Default} | ||
/> | ||
<ExampleSection | ||
title="Sizes" | ||
component={<Sizes />} | ||
code={server.button.examples.Sizes} | ||
/> | ||
<ExampleSection | ||
title="Variants" | ||
component={<Variants />} | ||
code={server.button.examples.Variants} | ||
/> | ||
<ExampleSection | ||
title="Icons" | ||
component={<Icons />} | ||
code={server.button.examples.Icons} | ||
/> | ||
<ExampleSection | ||
title="FullWidth" | ||
component={<FullWidth />} | ||
code={server.button.examples.FullWidth} | ||
/> | ||
<ExampleSection | ||
title="Disabled" | ||
component={<Disabled />} | ||
code={server.button.examples.Disabled} | ||
/> | ||
<ExampleSection | ||
title="Animations" | ||
component={<Animations />} | ||
code={server.button.examples.Animations} | ||
/> | ||
<ExampleSection | ||
title="Multiline" | ||
component={<Multiline />} | ||
code={server.button.examples.Multiline} | ||
/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The checkbox is shown as a square box that is ticked (checked) when activated. | ||
|
||
Checkboxes are used to let a user select one or more options of a limited number of choices. |
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,5 @@ | ||
import Checkbox from '@heathmont/moon-base-tw/lib/checkbox/Checkbox'; | ||
|
||
export const Default = () => <Checkbox />; | ||
|
||
export default Default; |
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,22 @@ | ||
import { Default } from '@/app/components/server/checkbox/examples/Default'; | ||
import ExampleSection from '@/app/components/shared/ExampleSection'; | ||
import QuickNav from '@/app/components/shared/QuickNav'; | ||
import { getExamples } from '@/app/utils/getExamples'; | ||
import { MDX } from '@/components/MDX'; | ||
|
||
export default async function Home() { | ||
const { server } = await getExamples(); | ||
const examplesList = Object.keys(server.checkbox.examples); | ||
return ( | ||
<div className="w-full max-w-7xl flex flex-col gap-4 text-moon-14"> | ||
<h1 className="font-medium text-moon-32">Checkbox</h1> | ||
<MDX markdown={server.checkbox.description} /> | ||
<QuickNav items={examplesList} /> | ||
<ExampleSection | ||
title="Default" | ||
component={<Default />} | ||
code={server.checkbox.examples.Default} | ||
/> | ||
</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
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 @@ | ||
const QuickNav = ({ items }: { items: string[] }) => ( | ||
<ul> | ||
{items.map((item) => ( | ||
<li key={item}> | ||
<a href={`#${item}`}>{item}</a> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
|
||
export default QuickNav; |
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
Oops, something went wrong.