-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run over JS/JSX files, and add a plugin to handle tailwind classes.
- Loading branch information
1 parent
91ef007
commit 04ca35e
Showing
36 changed files
with
330 additions
and
312 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 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 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,19 +1,19 @@ | ||
// Copyright DB InfraGO AG and contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import '../src/index.css' | ||
import '../src/index.css'; | ||
|
||
/** @type { import('@storybook/react').Preview } */ | ||
const preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
date: /Date$/i | ||
} | ||
} | ||
} | ||
}; | ||
|
||
export default preview; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
autoprefixer: {} | ||
} | ||
}; |
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 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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
|
||
// Copyright DB InfraGO AG and contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
const color_classes = { | ||
"default": "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300", | ||
"danger": "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300", | ||
"success": "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300", | ||
"warning": "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300" | ||
} | ||
default: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300', | ||
danger: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300', | ||
success: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300', | ||
warning: | ||
'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300' | ||
}; | ||
/* | ||
* provides a badge that may have different colors | ||
*/ | ||
export const Badge = ({ children, color="default" }) => ( | ||
<div className={"text-xs inline-block font-medium me-2 px-2.5 py-1 rounded-full " + color_classes[color] }> | ||
{children} | ||
</div> | ||
* provides a badge that may have different colors | ||
*/ | ||
export const Badge = ({ children, color = 'default' }) => ( | ||
<div | ||
className={ | ||
'me-2 inline-block rounded-full px-2.5 py-1 text-xs font-medium ' + | ||
color_classes[color] | ||
}> | ||
{children} | ||
</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
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
Oops, something went wrong.