[ENG-1079] Toggle focus styling update (#1309)

updated focus styling
This commit is contained in:
ameer2468
2023-09-07 14:29:36 +03:00
committed by GitHub
parent be71f31d63
commit bbd1d9a5b7
2 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
import { Meta } from '@storybook/react';
import { Switch } from './Switch';
const meta: Meta<typeof Switch> = {
title: 'Switch',
component: Switch,
argTypes: {},
parameters: {
backgrounds: {
default: 'dark'
}
},
};
export default meta;
export const Default = () => {
return (
<div className="w-full h-screen p-10 bg-app">
<h1 className="text-[20px] font-bold text-white">Switch</h1>
<div className='mt-6'>
<Switch/>
</div>
</div>
);
};

View File

@@ -12,7 +12,7 @@ const switchStyles = cva(
[
'relative inline-flex shrink-0 transition',
'items-center rounded-full p-1',
'bg-app-line radix-state-checked:bg-accent'
'bg-app-line radix-state-checked:bg-accent focus:outline-none focus:ring-1 focus:ring-accent focus:ring-offset-2 focus:ring-offset-app-selected'
],
{
variants: {