Skip to content

Commit d84cc67

Browse files
authored
fix: issue with typescript props for vue (#3783)
1 parent 6869107 commit d84cc67

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/components/src/shared/model.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type GlobalProps = {
1717
/**
1818
* Workaround for TypeScript using class for all components.
1919
*/
20-
class?: string;
20+
class?: string | any;
2121

2222
/**
2323
* [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.
@@ -29,11 +29,6 @@ export type GlobalProps = {
2929
*/
3030
id?: string;
3131

32-
/**
33-
* React specific for render process.
34-
*/
35-
key?: string;
36-
3732
/**
3833
* Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)
3934
*/

showcases/react-showcase/src/components/header/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const getHeader = ({
2020
className,
2121
describedbyid,
2222
id,
23-
key,
2423
onToggle,
2524
width,
2625
example,
@@ -74,7 +73,6 @@ const getHeader = ({
7473
className={className}
7574
describedbyid={describedbyid}
7675
id={id}
77-
key={key}
7876
onToggle={onToggle}>
7977
{(!example || withNavigation) && (
8078
<DBNavigation aria-label={children}>

showcases/react-showcase/src/components/page/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ const getPage = ({
1919
children,
2020
className,
2121
describedbyid,
22-
id,
23-
key
22+
id
2423
}: DBPageProps) => (
2524
<DBPage
2625
variant={variant}
2726
fadeIn={fadeIn}
2827
className={className}
2928
describedbyid={describedbyid}
3029
id={id}
31-
key={key}
3230
header={
3331
<DBHeader
3432
brand={<DBBrand title="DBHeader">DBHeader</DBBrand>}

showcases/vue-showcase/src/components/form/Form.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const tags = ref<string[]>([]);
2323
2424
const array = ["X", "Y", "Z"];
2525
26+
const isActive = ref(true);
27+
2628
const dataList = [{ key: "test", value: "Test" }, { key: "test2" }];
2729
2830
const changeTags = (tag: string) => {
@@ -178,6 +180,11 @@ const reset = () => {
178180
</fieldset>
179181
</form>
180182
</div>
183+
<DBButton
184+
:class="isActive ? 'blubber' : 'dada'"
185+
@click="isActive = !isActive"
186+
>Test</DBButton
187+
>
181188
<div>
182189
<h1>Output</h1>
183190
<dl>

0 commit comments

Comments
 (0)