Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update variants in Button and IconButton in core [MDS-678] #2370

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"fixed": [
[
"@heathmont/moon-base-tw",
"@heathmont/moon-cmdk-tw",
"@heathmont/moon-core-tw",
"@heathmont/moon-table-tw",
"@heathmont/moon-themes-tw",
"next-docs",
"docs"
]
],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
Expand Down
24 changes: 13 additions & 11 deletions next-docs/components/brandSwitcher/BrandSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ const BrandSwitcher = () => {
};
return (
<>
{THEMES.map((item, index) => (
<MenuItem
key={index}
role="radio"
isSelected={theme === item}
onClick={useCallback(() => handleClick(item), [item])}
>
<MenuItem.Title>{item}</MenuItem.Title>
<MenuItem.Radio />
</MenuItem>
))}
<div className="max-h-72 over overflow-auto">
{THEMES.map((item, index) => (
<MenuItem
key={index}
role="radio"
isSelected={theme === item}
onClick={useCallback(() => handleClick(item), [item])}
>
<MenuItem.Title>{item}</MenuItem.Title>
<MenuItem.Radio />
</MenuItem>
))}
</div>
<div className="h-px bg-beerus -mx-3" />
</>
);
Expand Down
2 changes: 1 addition & 1 deletion next-docs/components/codePreview/PreviewSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PreviewSwitch = ({
{!isPreviewActive && (
<IconButton
icon={<FilesCopy className="text-moon-24" />}
variant="secondary"
variant="outline"
onClick={copyCode}
size="lg"
aria-label="Copy code"
Expand Down
8 changes: 4 additions & 4 deletions next-docs/components/facing/ForDesigners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ const ForDesigners = () => (
href="https://www.figma.com/community/file/1002945721703152933"
target="_blank"
rel="noreferrer"
variant="secondary"
variant="outline"
>
Figma
</Button>
<Link href="/gettingStarted" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Getting Started
</Button>
</Link>
<Link href="/typography" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Typography
</Button>
</Link>
<Link href="/colours" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Colour Convention
</Button>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions next-docs/components/facing/ForDevelopers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ const ForDevelopers = () => {
href="https://github.com/coingaming/moon-design"
target="_blank"
rel="noreferrer"
variant="secondary"
variant="outline"
>
Github
</Button>
<Link href="/gettingStarted" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Getting Started
</Button>
</Link>
<Link href="/tokens" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Design Tokens
</Button>
</Link>
Expand All @@ -58,7 +58,7 @@ const ForDevelopers = () => {
href="https://github.com/coingaming/moon-design/blob/develop/packages/themes/src/moonDesignDark/moonDesignDark.ts"
target="_blank"
rel="noreferrer"
variant="secondary"
variant="outline"
>
Creating Themes
</Button>
Expand All @@ -67,12 +67,12 @@ const ForDevelopers = () => {
href="https://github.com/coingaming/moon-design/blob/develop/CONTRIBUTING.md"
target="_blank"
rel="noreferrer"
variant="secondary"
variant="outline"
>
Contribution
</Button>
<Link href="/components/accordion" passHref legacyBehavior>
<Button as="a" variant="secondary">
<Button as="a" variant="outline">
Components
</Button>
</Link>
Expand Down
1 change: 0 additions & 1 deletion next-docs/pages/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const PageButton = () => {
<ComponentPageDescription
title={name}
image={image}
isInProgress
isRtlSupport
isAriaSupport
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ Object {
class="flex flex-col gap-4 w-full"
>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 btn-primary w-32"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 text-goten bg-piccolo w-32"
type="button"
>
Toggle All
Expand Down Expand Up @@ -1441,7 +1441,7 @@ Object {
class="flex flex-col gap-4 w-full"
>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 btn-primary w-32"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 text-goten bg-piccolo w-32"
type="button"
>
Toggle All
Expand Down Expand Up @@ -4359,7 +4359,7 @@ Object {
class="flex flex-col gap-4 w-full"
>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 btn-primary w-32"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 text-goten bg-piccolo w-32"
type="button"
>
Toggle All
Expand Down Expand Up @@ -4484,7 +4484,7 @@ Object {
class="flex flex-col gap-4 w-full"
>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 btn-primary w-32"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 active:scale-90 text-goten bg-piccolo w-32"
type="button"
>
Toggle All
Expand Down
2 changes: 1 addition & 1 deletion next-docs/public/examples/alert/HandleClose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Example = () => {
</Alert>
);
return (
<Button variant="secondary" onClick={handleClick}>
<Button variant="outline" onClick={handleClick}>
Show Alert
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ Object {
/>
</div>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed btn-primary"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed text-goten bg-piccolo"
disabled=""
type="submit"
>
Expand Down Expand Up @@ -1814,7 +1814,7 @@ Object {
/>
</div>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed btn-primary"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed text-goten bg-piccolo"
disabled=""
type="submit"
>
Expand Down Expand Up @@ -3743,7 +3743,7 @@ Object {
/>
</div>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed btn-primary"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed text-goten bg-piccolo"
disabled=""
type="submit"
>
Expand Down Expand Up @@ -3819,7 +3819,7 @@ Object {
/>
</div>
<button
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed btn-primary"
class="px-4 h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden whitespace-nowrap select-none transition duration-200 opacity-60 cursor-not-allowed text-goten bg-piccolo"
disabled=""
type="submit"
>
Expand Down
2 changes: 1 addition & 1 deletion next-docs/public/examples/bottomSheet/Customization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Example = () => {
};
return (
<>
<Button variant="secondary" onClick={openBottomSheet}>
<Button variant="outline" onClick={openBottomSheet}>
Customized BottomSheet
</Button>
<BottomSheet open={isOpen} onClose={closeBottomSheet}>
Expand Down
2 changes: 1 addition & 1 deletion next-docs/public/examples/bottomSheet/Default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Example = () => {
};
return (
<>
<Button variant="secondary" onClick={openBottomSheet}>
<Button variant="outline" onClick={openBottomSheet}>
Default BottomSheet
</Button>
<BottomSheet open={isOpen} onClose={closeBottomSheet}>
Expand Down
6 changes: 3 additions & 3 deletions next-docs/public/examples/bottomSheet/Sizes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Example = () => {
return (
<>
<div>
<Button variant="secondary" onClick={openSmallBottomSheet}>
<Button variant="outline" onClick={openSmallBottomSheet}>
Default small BottomSheet
</Button>
<BottomSheet open={isSmallOpen} onClose={closeSmallBottomSheet}>
Expand All @@ -40,7 +40,7 @@ const Example = () => {
</BottomSheet>
</div>
<div>
<Button variant="secondary" onClick={openMediumBottomSheet}>
<Button variant="outline" onClick={openMediumBottomSheet}>
Medium BottomSheet
</Button>
<BottomSheet open={isMediumOpen} onClose={closeMediumBottomSheet}>
Expand All @@ -54,7 +54,7 @@ const Example = () => {
</BottomSheet>
</div>
<div>
<Button variant="secondary" onClick={openFullBottomSheet}>
<Button variant="outline" onClick={openFullBottomSheet}>
Fullscreen BottomSheet
</Button>
<BottomSheet open={isFullOpen} onClose={closeFullBottomSheet}>
Expand Down
2 changes: 1 addition & 1 deletion next-docs/public/examples/bottomSheet/WithDraghandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Example = () => {
};
return (
<>
<Button variant="secondary" onClick={openBottomSheet}>
<Button variant="outline" onClick={openBottomSheet}>
BottomSheet with Draghandle
</Button>
<BottomSheet open={isOpen} onClose={closeBottomSheet}>
Expand Down
4 changes: 2 additions & 2 deletions next-docs/public/examples/bottomSheet/WithTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Example = () => {
return (
<>
<div>
<Button variant="secondary" onClick={openTitleBottomSheet}>
<Button variant="outline" onClick={openTitleBottomSheet}>
BottomSheet with Title
</Button>
<BottomSheet open={isTitleOpen} onClose={closeTitleBottomSheet}>
Expand All @@ -33,7 +33,7 @@ const Example = () => {
</BottomSheet>
</div>
<div>
<Button variant="secondary" onClick={openMediumBottomSheet}>
<Button variant="outline" onClick={openMediumBottomSheet}>
BottomSheet with Title and Draghandle
</Button>
<BottomSheet open={isMediumOpen} onClose={closeMediumBottomSheet}>
Expand Down
Loading
Loading