Skip to content

Commit

Permalink
feat(Button): migrate to Tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
oreqizer committed Sep 20, 2023
1 parent cd1115f commit 6a84a6b
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 276 deletions.
4 changes: 2 additions & 2 deletions packages/orbit-components/src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import SPACINGS_AFTER from "../common/getSpacingToken/consts";
import Button from ".";

const getIcons = (name: string, defaultIcon: string) =>
select(name, Object.keys(Icons), defaultIcon);
select(name, ["none", ...Object.keys(Icons)], defaultIcon);

const getIcon = (source: string | null) => (source ? Icons[source] : null);
const getIcon = (source: string) => (source in Icons ? Icons[source] : null);

export default {
title: "Button",
Expand Down
21 changes: 0 additions & 21 deletions packages/orbit-components/src/Button/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,3 @@ export enum SIZE_OPTIONS {
NORMAL = "normal",
LARGE = "large",
}

export enum TOKENS {
// Size tokens
heightButton = "heightButton",
loadingWidth = "loadingWidth",
loadingHeight = "loadingHeight",
fontSizeButton = "fontSizeButton",
paddingButton = "paddingButton",
paddingButtonWithIcons = "paddingButtonWithIcons",
paddingButtonWithLeftIcon = "paddingButtonWithLeftIcon",
paddingButtonWithRightIcon = "paddingButtonWithRightIcon",
// Type tokens
backgroundButton = "backgroundButton",
backgroundButtonHover = "backgroundButtonHover",
backgroundButtonActive = "backgroundButtonActive",
backgroundButtonFocus = "backgroundButtonFocus",
colorTextButton = "colorTextButton",
colorTextButtonHover = "colorTextButtonHover",
colorTextButtonActive = "colorTextButtonActive",
borderColorButtonFocus = "borderColorButtonFocus",
}
49 changes: 0 additions & 49 deletions packages/orbit-components/src/Button/helpers/getButtonBoxShadow.ts

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions packages/orbit-components/src/Button/helpers/getButtonStyles.ts

This file was deleted.

112 changes: 0 additions & 112 deletions packages/orbit-components/src/Button/helpers/getButtonTypeToken.ts

This file was deleted.

Loading

0 comments on commit 6a84a6b

Please sign in to comment.