Skip to content

Commit

Permalink
feat: fix bg color and border radius on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
DaminiPandey committed Dec 18, 2023
1 parent 3610bf7 commit fa09dba
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ import React from 'react';

const AccordionCustomisedBackground = ({ ...props }: any) => {
return (
<Accordion {...props} size={'md'} shadowColor="transparent">
<Accordion
{...props}
size={'md'}
shadowColor="transparent"
bg="transparent"
>
<AccordionItem value="item-1" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger
sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}
>
{({ isExpanded }: { isExpanded: boolean }) => {
return (
<>
Expand All @@ -43,7 +54,13 @@ const AccordionCustomisedBackground = ({ ...props }: any) => {
</AccordionItem>
<AccordionItem value="item-2" mt="$5" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger
sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}
>
{({ isExpanded }: { isExpanded: boolean }) => {
return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ import React from 'react';

const AccordionRoundedCorners = ({ ...props }: any) => {
return (
<Accordion {...props} size={'md'} shadowColor="transparent">
<Accordion
{...props}
size={'md'}
shadowColor="transparent"
bg="transparent"
>
<AccordionItem value="item-1" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger
sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}
>
{({ isExpanded }: { isExpanded: boolean }) => {
return (
<>
Expand All @@ -43,7 +54,13 @@ const AccordionRoundedCorners = ({ ...props }: any) => {
</AccordionItem>
<AccordionItem value="item-2" mt="$5" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger
sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}
>
{({ isExpanded }: { isExpanded: boolean }) => {
return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,14 @@ The borderRadius prop can be used to create rounded corners for both the Accordi
code: `
function App(){
return (
<Accordion m="$5" width="80%" maxWidth={640} shadowColor="transparent">
<Accordion m="$5" width="80%" maxWidth={640} shadowColor="transparent" bg="transparent">
<AccordionItem value="item-1" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}>
{({ isExpanded }) => {
return (
<>
Expand All @@ -733,7 +737,11 @@ function App(){
</AccordionItem>
<AccordionItem value="item-2" mt="$5" borderRadius="$lg">
<AccordionHeader>
<AccordionTrigger>
<AccordionTrigger sx={{
':focusVisible': {
borderRadius: '$lg',
},
}}>
{({ isExpanded }) => {
return (
<>
Expand Down

0 comments on commit fa09dba

Please sign in to comment.