Skip to content

Commit

Permalink
fix: issue with typescript props for vue (#3783)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget authored Feb 6, 2025
1 parent 6869107 commit d84cc67
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions packages/components/src/shared/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type GlobalProps = {
/**
* Workaround for TypeScript using class for all components.
*/
class?: string;
class?: string | any;

/**
* [`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.
Expand All @@ -29,11 +29,6 @@ export type GlobalProps = {
*/
id?: string;

/**
* React specific for render process.
*/
key?: string;

/**
* Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)
*/
Expand Down
2 changes: 0 additions & 2 deletions showcases/react-showcase/src/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const getHeader = ({
className,
describedbyid,
id,
key,
onToggle,
width,
example,
Expand Down Expand Up @@ -74,7 +73,6 @@ const getHeader = ({
className={className}
describedbyid={describedbyid}
id={id}
key={key}
onToggle={onToggle}>
{(!example || withNavigation) && (
<DBNavigation aria-label={children}>
Expand Down
4 changes: 1 addition & 3 deletions showcases/react-showcase/src/components/page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ const getPage = ({
children,
className,
describedbyid,
id,
key
id
}: DBPageProps) => (
<DBPage
variant={variant}
fadeIn={fadeIn}
className={className}
describedbyid={describedbyid}
id={id}
key={key}
header={
<DBHeader
brand={<DBBrand title="DBHeader">DBHeader</DBBrand>}
Expand Down
7 changes: 7 additions & 0 deletions showcases/vue-showcase/src/components/form/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const tags = ref<string[]>([]);
const array = ["X", "Y", "Z"];
const isActive = ref(true);
const dataList = [{ key: "test", value: "Test" }, { key: "test2" }];
const changeTags = (tag: string) => {
Expand Down Expand Up @@ -178,6 +180,11 @@ const reset = () => {
</fieldset>
</form>
</div>
<DBButton
:class="isActive ? 'blubber' : 'dada'"
@click="isActive = !isActive"
>Test</DBButton
>
<div>
<h1>Output</h1>
<dl>
Expand Down

0 comments on commit d84cc67

Please sign in to comment.