Skip to content

Commit

Permalink
feat(@clayui/panel): Update displayType and size props (LPS-202818)
Browse files Browse the repository at this point in the history
As previously discussed, we are now using two now displayTypes that only affect the
styles of the component, and adding a new "size" prop that modifies the text size.
  • Loading branch information
pat270 committed Jan 19, 2024
1 parent 51a922b commit cda77e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/clay-panel/src/index.tsx
Expand Up @@ -51,7 +51,7 @@ export interface IProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Flag to indicate the visual variation of the Panel.
*/
displayType?: 'unstyled' | 'secondary';
displayType?: 'block' | 'default' | 'secondary' | 'unstyled';

/**
* Determines if menu is expanded or not (controlled).
Expand All @@ -68,6 +68,11 @@ export interface IProps extends React.HTMLAttributes<HTMLDivElement> {
*/
showCollapseIcon?: boolean;

/**
* Flag to indicate the visual variation of the Panel.
*/
size?: 'lg' | 'sm';

/**
* Path to spritemap for clay icons
*/
Expand All @@ -94,6 +99,7 @@ function ClayPanel({
expanded,
onExpandedChange,
showCollapseIcon = true,
size,
spritemap,
...otherProps
}: IProps) {
Expand All @@ -115,6 +121,7 @@ function ClayPanel({
{...otherProps}
className={classNames('panel', className, {
[`panel-${displayType}`]: displayType,
[`panel-${size}`]: size,
})}
>
{!collapsable && (
Expand Down

0 comments on commit cda77e2

Please sign in to comment.