diff options
| author | Adam <[email protected]> | 2025-10-22 17:31:44 -0500 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-10-22 17:31:49 -0500 |
| commit | 89b703c387aed3ee918d826b788b4be1729bdde9 (patch) | |
| tree | 9a22d26bfc5e921789924e2344d04113660b67a3 /packages/ui/src/components/icon-button.css | |
| parent | eff12cb48453e45590a53a7705c5044a0da9e7f7 (diff) | |
| download | opencode-89b703c387aed3ee918d826b788b4be1729bdde9.tar.gz opencode-89b703c387aed3ee918d826b788b4be1729bdde9.zip | |
wip: desktop work
Diffstat (limited to 'packages/ui/src/components/icon-button.css')
| -rw-r--r-- | packages/ui/src/components/icon-button.css | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/packages/ui/src/components/icon-button.css b/packages/ui/src/components/icon-button.css new file mode 100644 index 000000000..6fe95fccf --- /dev/null +++ b/packages/ui/src/components/icon-button.css @@ -0,0 +1,117 @@ +[data-component="icon-button"] { + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 100%; + text-decoration: none; + user-select: none; + aspect-ratio: 1; + + &:disabled { + background-color: var(--icon-strong-disabled); + color: var(--icon-invert-base); + cursor: not-allowed; + } + + &:focus { + outline: none; + } + + &[data-variant="primary"] { + background-color: var(--icon-strong-base); + + [data-slot="icon"] { + /* color: var(--icon-weak-base); */ + color: var(--icon-invert-base); + + /* &:hover:not(:disabled) { */ + /* color: var(--icon-weak-hover); */ + /* } */ + /* &:active:not(:disabled) { */ + /* color: var(--icon-string-active); */ + /* } */ + } + + &:hover:not(:disabled) { + background-color: var(--icon-strong-hover); + } + &:active:not(:disabled) { + background-color: var(--icon-string-active); + } + &:focus:not(:disabled) { + background-color: var(--icon-strong-focus); + } + &:disabled { + background-color: var(--icon-strong-disabled); + + [data-slot="icon"] { + color: var(--icon-invert-base); + } + } + } + + &[data-variant="secondary"] { + background-color: var(--button-secondary-base); + color: var(--text-strong); + + &:hover:not(:disabled) { + background-color: var(--surface-hover); + } + &:active:not(:disabled) { + background-color: var(--surface-active); + } + &:focus:not(:disabled) { + background-color: var(--surface-focus); + } + } + + &[data-variant="ghost"] { + background-color: transparent; + + [data-slot="icon"] { + color: var(--icon-weak-base); + + &:hover:not(:disabled) { + color: var(--icon-weak-hover); + } + &:active:not(:disabled) { + color: var(--icon-string-active); + } + } + + /* color: var(--text-strong); */ + /**/ + /* &:hover:not(:disabled) { */ + /* background-color: var(--surface-hover); */ + /* } */ + /* &:active:not(:disabled) { */ + /* background-color: var(--surface-active); */ + /* } */ + /* &:focus:not(:disabled) { */ + /* background-color: var(--surface-focus); */ + /* } */ + } + + &[data-size="normal"] { + width: 24px; + height: 24px; + + font-size: var(--font-size-small); + line-height: var(--line-height-large); + gap: calc(var(--spacing) * 0.5); + } + + &[data-size="large"] { + height: 32px; + padding: 0 8px 0 6px; + gap: 8px; + + /* text-12-medium */ + font-family: var(--font-family-sans); + font-size: var(--font-size-small); + font-style: normal; + font-weight: var(--font-weight-medium); + line-height: var(--line-height-large); /* 166.667% */ + letter-spacing: var(--letter-spacing-normal); + } +} |
