Skip to content

Commit

Permalink
Merge pull request #775 from WestpacGEL/feature/panel-fix
Browse files Browse the repository at this point in the history
feat(panel): removing margin bottom and making heading as non required
  • Loading branch information
samithaf authored Apr 18, 2024
2 parents c70d775 + 95aa2fb commit 217886e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/panel/panel.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function Panel({ className, children, heading, headingTag: Tag = 'h1', lo
const styles = panelStyles({ look });
return (
<div className={styles.base({ className })} {...props}>
<Tag className={styles.header()}>{heading}</Tag>
{heading && <Tag className={styles.header()}>{heading}</Tag>}
{children}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/panel/panel.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { tv } from 'tailwind-variants';
export const styles = tv(
{
slots: {
base: 'group/panel mb-4 overflow-hidden rounded border border-hero',
base: 'group/panel overflow-hidden rounded border border-hero',
header: 'px-2 py-[0.625rem] sm:px-4',
},
variants: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/panel/panel.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type PanelProps = {
/**
* The heading of the panel
*/
heading: string;
heading?: string;
/**
* Tag for heading defaults to h1
* @default h1
Expand Down

0 comments on commit 217886e

Please sign in to comment.