Skip to content

Commit

Permalink
OBVIVO-2814 (Simple Block): the label property was added to the simpl…
Browse files Browse the repository at this point in the history
…e block, and some adjustments were also included using the Inline component to align the position in the component
  • Loading branch information
wendellguimaraes-tlf committed Jan 8, 2025
1 parent 73e33eb commit d52e2f0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 24 additions & 11 deletions src/community/blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,35 @@ interface SimpleBlockProps {
image?: RendersNullableElement<typeof Image>;
description?: string;
'aria-label'?: string;
label?: string;
}

export const SimpleBlock = ({image, description, 'aria-label': ariaLabel}: SimpleBlockProps): JSX.Element => {
export const SimpleBlock = ({
image,
description,
'aria-label': ariaLabel,
label,
}: SimpleBlockProps): JSX.Element => {
return (
<div aria-label={ariaLabel}>
<Inline space={16} alignItems="center">
<div
style={applyCssVars({
[mediaStyles.vars.mediaBorderRadius]: vars.borderRadii.mediaSmall,
})}
>
{image}
<Inline space="between" alignItems="center">
<Inline space={16} alignItems="center">
<div
style={applyCssVars({
[mediaStyles.vars.mediaBorderRadius]: vars.borderRadii.mediaSmall,
})}
>
{image}
</div>
<Text2 regular color={vars.colors.textSecondary}>
{description}
</Text2>
</Inline>
<div className={styles.rightContent}>
<Text2 regular color={vars.colors.textBrand}>
{label}
</Text2>
</div>
<Text2 regular color={vars.colors.textSecondary}>
{description}
</Text2>
</Inline>
</div>
);
Expand Down

0 comments on commit d52e2f0

Please sign in to comment.