-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e01df64
commit 5c4684d
Showing
3 changed files
with
53 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { createSnapComponent } from '../component'; | ||
|
||
/** | ||
* The props of the {@link Cell} component. | ||
* | ||
* @property value - The value to copy when the user clicks on the copyable | ||
* element. | ||
* @property sensitive - Whether the value is sensitive. If `true`, the value | ||
* will be hidden when the user is not interacting with the copyable element. | ||
*/ | ||
export type CellProps = { | ||
image: string; | ||
title: string; | ||
description: string; | ||
value: string; | ||
valueExtra: string; | ||
}; | ||
|
||
const TYPE = 'Cell'; | ||
|
||
/** | ||
* A copyable component, which is used to display text that can be copied by the | ||
* user. | ||
* | ||
* @param props - The props of the component. | ||
* @example | ||
* TODO | ||
*/ | ||
export const Cell = createSnapComponent<CellProps, typeof TYPE>(TYPE); | ||
|
||
/** | ||
* A cell element. | ||
* | ||
* @see Cell | ||
*/ | ||
export type CellElement = ReturnType<typeof Cell>; |
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