Skip to content

Commit

Permalink
feat: creates hollow style for button inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-boyd committed Nov 9, 2023
1 parent c98dc8f commit ec9dc9c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 26 deletions.
27 changes: 2 additions & 25 deletions src/families/button.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,22 @@
export default {
outer: `
data-[disabled]:opacity-100
`,
input: `
${"" /* base styles */}
font-bold
bg-$accentColor-$baseColorShade
$radius
outline-none
flex
!text-$scale(-1,*)
px-$spacing(7,*)
py-$spacing(2,3,10)
outline-none
flex
items-center
mb-$spacing(-1)
text-white
text-$scale(-1,*)
active:text-$accentColor-100
active:bg-$accentColor-$baseColorShade(1,*)
hover:bg-$accentColor-$baseColorShade(1,*)
ring-offset-2
ring-$accentColor-$baseColorShade(-1,*)
focus-visible:ring-2
disabled:border-$colorTemperature-$borderShadeLightMode
disabled:bg-$colorTemperature-400
disabled:text-$colorTemperature-100
group-data-[disabled]:!cursor-not-allowed
$inputShadow
group-data-[prefix-icon]:pl-$spacing(5,*)
group-data-[suffix-icon]:pr-$spacing(5,*)
${"" /* dark mode styles */}
dark:disabled:border-$colorTemperature-100
dark:disabled:bg-$colorTemperature-500
dark:disabled:text-$colorTemperature-200
dark:ring-offset-$accentColor-$baseColorShade(-1,*)
`,
prefixIcon: `
text-$colorTemperature-100
`,
suffixIcon: `
text-$colorTemperature-100
`,
};
11 changes: 11 additions & 0 deletions src/inputs/button.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
export default {
// inherits family:button classes
input: `
border
border-$accentColor-$baseColorShade
text-$accentColor-$baseColorShade
hover:bg-$accentColor-50
${"" /* dark mode styles */}
dark:border-$accentColor-500
dark:text-$accentColor-500
dark:hover:bg-$accentColor-900/20
`,
};
28 changes: 27 additions & 1 deletion src/inputs/submit.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
export default {
// inherits family:button classes
outer: `
data-[disabled]:opacity-100
`,
input: `
${"" /* base styles */}
bg-$accentColor-$baseColorShade
text-white
active:text-$accentColor-100
active:bg-$accentColor-$baseColorShade(1,*)
hover:bg-$accentColor-$baseColorShade(1,*)
disabled:border-$colorTemperature-$borderShadeLightMode
disabled:bg-$colorTemperature-400
disabled:text-$colorTemperature-100
group-data-[disabled]:!cursor-not-allowed
${"" /* dark mode styles */}
dark:disabled:border-$colorTemperature-100
dark:disabled:bg-$colorTemperature-500
dark:disabled:text-$colorTemperature-200
dark:ring-offset-$accentColor-$baseColorShade(-1,*)
`,
prefixIcon: `
text-$colorTemperature-100
`,
suffixIcon: `
text-$colorTemperature-100
`,
};

0 comments on commit ec9dc9c

Please sign in to comment.