-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) O3-4022 Ward App add loading skeleton to bed divider (#1370)
* (feat) O3-4022 Ward App add loading skeleton to bed divider * Update packages/esm-ward-app/src/beds/bed-share-divider.component.tsx Co-authored-by: Dennis Kigen <[email protected]> * Update packages/esm-ward-app/src/beds/bed-share-divider.scss Co-authored-by: Dennis Kigen <[email protected]> * misc typo --------- Co-authored-by: Dennis Kigen <[email protected]>
- Loading branch information
1 parent
9516380
commit cd0e638
Showing
7 changed files
with
64 additions
and
41 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
packages/esm-ward-app/src/beds/bed-share-divider.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { SkeletonText, Tag } from '@carbon/react'; | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import styles from './bed-share-divider.scss'; | ||
|
||
interface BedShareDividerProps { | ||
isLoading?: boolean; | ||
} | ||
|
||
const BedShareDivider: React.FC<BedShareDividerProps> = ({ isLoading }) => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className={styles.bedDivider}> | ||
<div className={styles.bedDividerLine}></div> | ||
{isLoading ? <SkeletonText /> : <Tag>{t('bedShare', 'Bed share')}</Tag>} | ||
<div className={styles.bedDividerLine}></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BedShareDivider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@use '@carbon/layout'; | ||
@use '@openmrs/esm-styleguide/src/vars' as *; | ||
@use '@carbon/type'; | ||
|
||
.bedDivider { | ||
background-color: $ui-02; | ||
color: $text-02; | ||
padding: layout.$spacing-01; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.bedDividerLine { | ||
height: 1px; | ||
background-color: $ui-05; | ||
width: 30%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters