Commit e14e8d5e authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Use pixel (arbitrary) values instead of default `rounded` styles

Update component styles that use `rounded` without size qualification.
The intent here was for a border radius that was larger than the
standard border-radius pattern. Tailwind default for `rounded` is 4px,
so this worked, but this breaks down if we want to change the pattern
default border radius. Update these to be explicit about radius size so
that we may set a default `rounded `value, and, in future, adjust it
without breaking styling on these components.
parent df10f49e
...@@ -19,7 +19,7 @@ function NumberIcon({ badgeCount }: { badgeCount: number }) { ...@@ -19,7 +19,7 @@ function NumberIcon({ badgeCount }: { badgeCount: number }) {
return ( return (
<span <span
className={classnames( className={classnames(
'rounded px-1 py-0.5', 'rounded-[4px] px-1 py-0.5',
// The background color is inherited from the current text color in // The background color is inherited from the current text color in
// the containing button and will vary depending on hover state. // the containing button and will vary depending on hover state.
'bg-current' 'bg-current'
...@@ -238,7 +238,7 @@ export default function AdderToolbar({ ...@@ -238,7 +238,7 @@ export default function AdderToolbar({
// default border values from Tailwind and have to be explicit about all // default border values from Tailwind and have to be explicit about all
// border attributes. // border attributes.
'border border-solid border-grey-3', 'border border-solid border-grey-3',
'absolute select-none bg-white rounded shadow-adder-toolbar', 'absolute select-none bg-white rounded-[4px] shadow-adder-toolbar',
// Start at a very low opacity as we're going to fade in in the animation // Start at a very low opacity as we're going to fade in in the animation
'opacity-5', 'opacity-5',
{ {
......
...@@ -37,7 +37,7 @@ function ClusterStyleControl({ ...@@ -37,7 +37,7 @@ function ClusterStyleControl({
<div className="space-y-2"> <div className="space-y-2">
<div className="flex items-center gap-x-2 text-annotator-base"> <div className="flex items-center gap-x-2 text-annotator-base">
<div <div
className="grow text-color-text px-2 py-1 rounded" className="grow text-color-text px-2 py-1 rounded-[4px]"
style={{ style={{
backgroundColor: highlightStyles[appliedStyleName].color, backgroundColor: highlightStyles[appliedStyleName].color,
}} }}
......
...@@ -31,7 +31,7 @@ function ToolbarButton({ icon: Icon, ...buttonProps }: ToolbarButtonProps) { ...@@ -31,7 +31,7 @@ function ToolbarButton({ icon: Icon, ...buttonProps }: ToolbarButtonProps) {
return ( return (
<Button <Button
classes={classnames( classes={classnames(
'justify-center rounded-px', 'justify-center rounded-[4px]',
'w-[30px] h-[30px]', 'w-[30px] h-[30px]',
'shadow border bg-white text-grey-6 hover:text-grey-9' 'shadow border bg-white text-grey-6 hover:text-grey-9'
)} )}
......
...@@ -225,7 +225,7 @@ function Toolbar({ isPreviewing, onCommand, onTogglePreview }: ToolbarProps) { ...@@ -225,7 +225,7 @@ function Toolbar({ isPreviewing, onCommand, onTogglePreview }: ToolbarProps) {
className={classnames( className={classnames(
// Allow buttons to wrap to second line if necessary. // Allow buttons to wrap to second line if necessary.
'flex flex-wrap w-full items-center', 'flex flex-wrap w-full items-center',
'p-1 border-x border-t rounded-t bg-white', 'p-1 border-x border-t rounded-t-[4px] bg-white',
// For touch interfaces, allow height to scale to larger button targets. // For touch interfaces, allow height to scale to larger button targets.
// Don't wrap buttons but instead scroll horizontally. Add bottom // Don't wrap buttons but instead scroll horizontally. Add bottom
// padding to provide some space for scrollbar. // padding to provide some space for scrollbar.
......
...@@ -39,7 +39,7 @@ function ToastBadge({ ...@@ -39,7 +39,7 @@ function ToastBadge({
return ( return (
<div <div
className={classnames( className={classnames(
'flex items-center gap-x-1 py-1 px-2 rounded', 'flex items-center gap-x-1 py-1 px-2 rounded-[4px]',
'bg-green-success/10 animate-pulse-fade-out', 'bg-green-success/10 animate-pulse-fade-out',
classes classes
)} )}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment