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: build the button component based on updated spec #35

Open
wants to merge 6 commits into
base: fix/failing-package-generator
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
chore: testing button component in packages-playground
ahmadshaheer committed Feb 26, 2025
commit 08810f6df85f4b2ad591ff2286913612fc18c044
61 changes: 35 additions & 26 deletions apps/packages-playground/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
import "./App.css";
import { ThemeSwitcher, useTheme } from "@signozhq/theme";
import { Button } from "@signozhq/button";
import { Typography } from "@signozhq/design-tokens";
import { Spacing } from "@signozhq/design-tokens";
import './App.css';

function App() {
const { theme, currentThemeColors } = useTheme();
import { ThemeSwitcher, useTheme } from '@signozhq/theme';
import Button from '@signozhq/button';
import { Typography } from '@signozhq/design-tokens';
import { Spacing } from '@signozhq/design-tokens';
import { ColorTailwind } from '@signozhq/design-tokens';
import { ArrowBigRightDash, Wrench } from 'lucide-react';

return (
<>
<h1>Theme Switcher and Button</h1>
<ThemeSwitcher />
function App() {
const { currentThemeColors } = useTheme();
console.log(ColorTailwind);

<Button theme={theme} variant="secondary">
hey
</Button>
return (
<>
<h1>Theme Switcher and Button</h1>
<ThemeSwitcher />

<h1>Design tokens</h1>
<p
style={{
background: currentThemeColors.TEXT_COLOR,
letterSpacing: Spacing.MARGIN_10,
fontSize: Typography.FONTSIZE_3XL,
}}
>
hey
</p>
</>
);
<Button
backgroundColor="robin-500"
textColor="vanilla-100"
size="md"
prefixIcon={<Wrench />}
suffixIcon={<ArrowBigRightDash />}
>
Click Me
</Button>
<h1>Design tokens</h1>
<p
style={{
background: currentThemeColors.TEXT_COLOR,
letterSpacing: Spacing.MARGIN_10,
fontSize: Typography.FONTSIZE_3XL,
}}
>
hey
</p>
</>
);
}

export default App;
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -19,4 +19,9 @@ export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
rules: {
'react/react-in-jsx-scope': 'off',
},
},
];