Skip to content

Commit

Permalink
♻️ use tailwind variable for teal text
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibaud BRAULT committed Sep 24, 2024
1 parent 8a74887 commit 3468378
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/register/plan/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function Form() {
className="w-full overflow-hidden rounded-md bg-primary-foreground-alpha p-4 text-center text-primary shadow-sm shadow-tealA-7 transition-all duration-300 hover:shadow-tealA-8"
>
<div>
<h3 className="text-sm font-semibold uppercase text-tealA-11">
<h3 className="text-sm font-semibold uppercase text-accent-secondary">
{plan.label}
</h3>
<p className="mt-2 text-4xl font-bold">
Expand All @@ -134,7 +134,7 @@ export default function Form() {
<ul className="list-none text-right">
{plan.benefits.map((benefit) => (
<li key={benefit} className="flex gap-2">
<Check className="text-teal-9" />
<Check className="text-accent" />
<p>{benefit}</p>
</li>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const button = cva('transition-all duration-300 ease-in-out lowercase', {
'bg-primary-foreground text-primary shadow-sm shadow-grayA-7 hover:bg-primary-foreground-hover disabled:shadow-transparent disabled:bg-transparent',

secondary:
'bg-transparent text-tealA-11 shadow-sm shadow-tealA-7 hover:shadow-tealA-8',
'bg-transparent text-accent-secondary shadow-sm shadow-tealA-7 hover:shadow-tealA-8',

destructive:
'bg-destructive text-white shadow-sm shadow-transparent hover:bg-destructive-hover disabled:bg-destructive-disabled disabled:text-redA-11 disabled:shadow-sm disabled:shadow-redA-7 disabled:hover:shadow-redA-8 disabled:dark:bg-destructive-disabled-dark',
Expand Down
2 changes: 1 addition & 1 deletion src/components/field/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Field = ({
return (
<div
key={value}
className="flex flex-col gap-2 [&_svg]:focus-within:text-teal-10"
className="flex flex-col gap-2 [&_svg]:focus-within:text-accent-focus"
>
<div className="flex items-center gap-1">
<Label
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const SelectItem = forwardRef<
>
<span className="absolute left-2 flex size-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
<Check className="size-4 text-teal-9" />
<Check className="size-4 text-accent" />
</SelectPrimitive.ItemIndicator>
</span>

Expand Down
2 changes: 1 addition & 1 deletion src/modules/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const Search = ({ tags }: Props) => {

return (
<section className="mx-auto flex w-11/12 items-end justify-center gap-8 md:w-3/4">
<div className="group/search flex w-full flex-col gap-1 [&_svg]:focus-within:text-tealA-8">
<div className="group/search flex w-full flex-col gap-1 [&_svg]:focus-within:text-accent-focus">
<Label
htmlFor="search"
className="lowercase"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/settings/users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Users = ({ userId, tenantId, plan, users, usersCount }: Props) => {
<div className="flex flex-col items-start">
<h2
className={`text-xl font-semibold ${
user.role !== 'user' ? 'text-teal-11' : ''
user.role !== 'user' ? 'text-accent-secondary' : ''
}`}
>
<b>{user.name}</b>
Expand Down
5 changes: 5 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ module.exports = {
muted: 'var(--gray-11)',
negative: 'var(--gray-1)'
},
accent: {
DEFAULT: 'var(--teal-9)',
focus: 'var(--teal-10)',
secondary: 'var(--teal-11)',
},
destructive: {
DEFAULT: 'var(--red-9)',
hover: 'var(--red-10)'
Expand Down

0 comments on commit 3468378

Please sign in to comment.