Skip to content

Commit

Permalink
fix(copytext): set value to required
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips committed Jun 29, 2023
1 parent d52b5c5 commit 2b66091
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ declare namespace LocalJSX {
/**
* The string that is displayed and that is also copied to the clipboard upon interaction.
*/
"value"?: string;
"value": string;
}
interface PdsDivider {
/**
Expand Down
2 changes: 1 addition & 1 deletion libs/core/src/components/pds-copytext/pds-copytext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class PdsCopytext {
/**
* The string that is displayed and that is also copied to the clipboard upon interaction.
*/
@Prop() value: string;
@Prop() value!: string;

async copyToClipboard(value: string) {
try {
Expand Down
10 changes: 5 additions & 5 deletions libs/core/src/components/pds-copytext/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

## Properties

| Property | Attribute | Description | Type | Default |
| ----------- | ------------ | --------------------------------------------------------------------------------------- | --------- | ----------- |
| `border` | `border` | Determines whether copytext should have a border. | `boolean` | `true` |
| `fullWidth` | `full-width` | Determines whether copytext should expand to the full width of its container. | `boolean` | `false` |
| `value` | `value` | The string that is displayed and that is also copied to the clipboard upon interaction. | `string` | `undefined` |
| Property | Attribute | Description | Type | Default |
| -------------------- | ------------ | --------------------------------------------------------------------------------------- | --------- | ----------- |
| `border` | `border` | Determines whether copytext should have a border. | `boolean` | `true` |
| `fullWidth` | `full-width` | Determines whether copytext should expand to the full width of its container. | `boolean` | `false` |
| `value` _(required)_ | `value` | The string that is displayed and that is also copied to the clipboard upon interaction. | `string` | `undefined` |


## Dependencies
Expand Down

0 comments on commit 2b66091

Please sign in to comment.