Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Sep 7, 2023
1 parent a1a31c4 commit b4ede17
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
&__status {
width: var(--bt-size-7);
height: var(--bt-size-7);
background-color: red;
background-color: #c83939;
position: absolute;
border-radius: 100%;
top: var(--bt-size-5);
right: var(--bt-size-15);
right: 17px;
border-color: white;
border-width: 1px;
border-style: solid;
}
}

Expand Down
48 changes: 26 additions & 22 deletions ui/src/pages/Data/Avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,33 @@ const Avatar = () => {
/>
</InputGrid>

<ResponsiveSegementWithLabel
value={shapeType}
label="Avatar shape"
options={AVATAR_SHAPE_SEGMENTED_OPTIONS}
onChange={(value) => {
if (value) {
setShapeType(value as AvatarShapeType);
}
}}
/>

{shapeType === AvatarShape.Custom && (
<Form.Item label="Avatar border radius">
<Slider
defaultValue={0}
value={customBorderRadius}
onChange={(value) =>
value !== null &&
setCustomBorderRadius(value)
<InputGrid>
<ResponsiveSegementWithLabel
value={shapeType}
label="Avatar shape"
options={AVATAR_SHAPE_SEGMENTED_OPTIONS}
onChange={(value) => {
if (value) {
setShapeType(value as AvatarShapeType);
}
/>
</Form.Item>
)}
}}
/>
{shapeType === AvatarShape.Custom && (
<Form.Item
label="Avatar border radius"
style={{ paddingLeft: "10px" }}
>
<Slider
defaultValue={0}
value={customBorderRadius}
onChange={(value) =>
value !== null &&
setCustomBorderRadius(value)
}
/>
</Form.Item>
)}
</InputGrid>
</Form>
</Card>

Expand Down

0 comments on commit b4ede17

Please sign in to comment.