-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: more strict type illusterationkind and prop drill classname an… (
#367) * chore: more strict typing for illusterationkind and prop drill classname and style
- Loading branch information
Showing
4 changed files
with
98 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
import { PropsWithChildren, ReactNode } from "react"; | ||
import { HTMLAttributes, PropsWithChildren, ReactNode } from "react"; | ||
|
||
import { Illustration } from "./constants"; | ||
|
||
export type IllustrationKind = keyof typeof Illustration; | ||
export type IllustrationKind = | ||
| "add-user-profile" | ||
| "data" | ||
| "devices" | ||
| "empty-folder" | ||
| "empty-space" | ||
| "file-missing" | ||
| "general" | ||
| "media" | ||
| "no-access" | ||
| "no-connection" | ||
| "no-content" | ||
| "no-match" | ||
| "no-sites" | ||
| "not-found" | ||
| "settings" | ||
| "success" | ||
| "team" | ||
| "under-construction"; | ||
|
||
export interface ContentProps { | ||
readonly body: ReactNode; | ||
readonly illustration: IllustrationKind; | ||
readonly title: string; | ||
} | ||
|
||
export type EmptyViewProps = PropsWithChildren<{ | ||
readonly after?: ReactNode; | ||
readonly illustration: IllustrationKind; | ||
readonly title: string; | ||
}>; | ||
export type EmptyViewProps = PropsWithChildren< | ||
{ | ||
readonly after?: ReactNode; | ||
readonly illustration: IllustrationKind; | ||
readonly title: string; | ||
} & HtmlDivAttributesRestProps | ||
>; | ||
|
||
export type HtmlDivAttributesRestProps = Pick< | ||
HTMLAttributes<HTMLDivElement>, | ||
"className" | "style" | ||
>; |
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