Skip to content

Commit

Permalink
Table placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikMatiasko committed Apr 26, 2024
1 parent 0345060 commit 8703994
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Atomic/TableNew/Table.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ export const isSelected = (theme: ThemeType) => css`
}
}
`

export const placeholder = css``
1 change: 1 addition & 0 deletions src/components/Atomic/TableNew/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const Table: FC<Props> = (props) => {
{/* })}*/}
</tbody>
</table>
{i18n.placeholder && data.length === 0 && <div css={styles.placeholder}>{i18n.placeholder}</div>}
</ConditionalWrapper>
</div>
{enablePagination && renderPagination()}
Expand Down
1 change: 1 addition & 0 deletions src/components/Atomic/TableNew/Table.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type Props = {
hideHeader?: boolean
i18n: {
search: string
placeholder?: string
}
id?: string
getCellProps?: (data: any) => void
Expand Down
1 change: 1 addition & 0 deletions src/components/Organisms/CaPool/CaPool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const CaPool: FC<Props> = (props) => {
hideHeader={true}
i18n={{
search: i18n.search,
placeholder: i18n?.placeholder,
}}
showFilterButton={false}
/>
Expand Down
1 change: 1 addition & 0 deletions src/components/Organisms/CaPool/CaPool.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type Props = {
delete: string
download: string
edit: string
placeholder?: string
search: string
showMore: string
update: string
Expand Down

0 comments on commit 8703994

Please sign in to comment.