diff --git a/packages/ui-pattern-block/src/UIPatternBlock.tsx b/packages/ui-pattern-block/src/UIPatternBlock.tsx index 95c1c67c1..e51e66376 100644 --- a/packages/ui-pattern-block/src/UIPatternBlock.tsx +++ b/packages/ui-pattern-block/src/UIPatternBlock.tsx @@ -10,9 +10,6 @@ import { } from '@frontify/guideline-blocks-settings'; import { SandpackLayout, SandpackPreview, SandpackPreviewRef, SandpackProvider } from '@codesandbox/sandpack-react'; -import 'tailwindcss/tailwind.css'; -import '@frontify/guideline-blocks-settings/styles'; - import { Alignment, Height, type Settings, TextAlignment, sandpackThemeValues } from './types'; import { DEFAULT_BLOCK_SETTINGS, @@ -94,6 +91,7 @@ export const UIPatternBlock = ({ appBridge }: BlockProps): ReactElement => { npmDependencies, externalDependencies, resetFiles, + sandpackTheme, ]; const onResetFiles = () => { @@ -187,7 +185,11 @@ export const UIPatternBlock = ({ appBridge }: BlockProps): ReactElement => { ...(hasBorder && getBorderStyles(borderStyle, borderWidth, borderColor)), borderRadius, }} - className="tw-rounded tw-bg-white" + className={joinClassNames([ + 'tw-rounded tw-bg-white tw-overflow-hidden tw-group', + // Used to hide border-bottom of last elements in component from also applying a border (eg. Accordion.tsx). + hasBorder && 'bordered', + ])} > { externalResources: [cssToInject, ...parsedExternalDependencies], }} > - + {isResponsivePreviewOpen && ( setIsResponsivePreviewOpen(false)} /> )} @@ -217,8 +216,6 @@ export const UIPatternBlock = ({ appBridge }: BlockProps): ReactElement => { ...getBackgroundColorStyles(backgroundColor), backgroundImage: 'none', }), - borderTopRightRadius: borderRadius, - borderTopLeftRadius: borderRadius, }} showRefreshButton={false} showOpenInCodeSandbox={false} diff --git a/packages/ui-pattern-block/src/components/Accordion.tsx b/packages/ui-pattern-block/src/components/Accordion.tsx index 67bfdff3b..7b47519b6 100644 --- a/packages/ui-pattern-block/src/components/Accordion.tsx +++ b/packages/ui-pattern-block/src/components/Accordion.tsx @@ -1,6 +1,6 @@ /* (c) Copyright Frontify Ltd., all rights reserved. */ -import { FOCUS_VISIBLE_STYLE, IconCaretDown12 } from '@frontify/fondue'; +import { FOCUS_VISIBLE_STYLE_INSET, IconCaretDown12 } from '@frontify/fondue'; import { joinClassNames } from '@frontify/guideline-blocks-settings'; import { PropsWithChildren, ReactElement } from 'react'; @@ -19,13 +19,16 @@ export const Accordion = ({ borderRadius, }: PropsWithChildren): ReactElement => { return ( -
+