Skip to content

Commit

Permalink
docs: removed custom events from Readmes
Browse files Browse the repository at this point in the history
docs: refactored wrong description prop for textarea
  • Loading branch information
nmerget committed Apr 11, 2024
1 parent 91ba8bf commit 64b82dc
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 89 deletions.
33 changes: 0 additions & 33 deletions output/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,39 +96,6 @@ There are 3 ways to use Events in Angular:
></DBInput>
```

## Custom Events

We do not provide every event on every component. If you are missing an event please [add an issue](https://github.com/db-ui/mono/issues).

As a workaround you can use refs:

### Ref on component

```html
<DBButton #buttonRef>Test</DBButton>
```

```ts
import { Component, ViewChild, AfterViewInit } from "@angular/core";

@Component({
selector: "app-my-component",
templateUrl: "./my-component.component.html"
})
export class MyComponent implements AfterViewInit {
@ViewChild("buttonRef") buttonRef: any;

ngAfterViewInit(): void {
this.buttonRef?.component?.nativeElement?.addEventListener(
"mouseenter",
(ev: any) => {
console.log(ev);
}
);
}
}
```

## Deutsche Bahn brand

As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even when being used with the code that we're provide with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UI products free to use and release it under the Apache 2.0 license.
Expand Down
27 changes: 0 additions & 27 deletions output/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,6 @@ import { DBButton } from '@db-ui/react-components';
...
```

## Custom Events

We do not provide every event on every component. If you are missing an event please [add an issue](https://github.com/db-ui/mono/issues).

As a workaround you can use the forwardRef:

### Ref on component

```tsx
import { DBButton } from "@db-ui/react-components";
import { useEffect, useRef } from "react";

const MyComponent = () => {
const buttonRef = useRef<HTMLButtonElement>(null);

useEffect(() => {
if (buttonRef.current) {
buttonRef.current.onmouseenter = (ev) => {
console.log(ev);
};
}
}, [buttonRef]);

return <DBButton ref={buttonRef}>Test</DBButton>;
};
```

## Deutsche Bahn brand

As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even when being used with the code that we're provide with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UI products free to use and release it under the Apache 2.0 license.
Expand Down
27 changes: 0 additions & 27 deletions output/vue/vue3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,6 @@ Both Inputs in this example do the same:
</template>
```

## Custom Events

We do not provide every event on every component. If you are missing an event please [add an issue](https://github.com/db-ui/mono/issues).

As a workaround you can use refs:

### Ref on component

```vue
<script setup lang="ts">
import { DBButton } from "@db-ui/v-components";
import { ref, onMounted } from "vue";
const buttonRef: any = ref(null);
onMounted(() => {
buttonRef.value.$refs.component.addEventListener("mouseenter", (ev) => {
console.log(ev);
});
});
</script>
<template>
<DBButton ref="buttonRef">Test</DBButton>
</template>
```

## Deutsche Bahn brand

As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even when being used with the code that we're provide with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UI products free to use and release it under the Apache 2.0 license.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AppComponent {
name="textarea"
label="Textarea Controlled"
placeholder="Placeholder"
description="Description"
message="Message"
icon="account"
[value]="textarea"
(change)="textarea = $event.target.value"
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/textarea/docs/React.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const App = () => {
return (
<DBTextarea
label="Textarea Controlled"
message="Message"
value={textarea}
onChange={(event) => {
setTextarea(event.target.value);
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/textarea/docs/Vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const textarea = ref("default value");
<DBTextarea
label="Textarea value"
placeholder="Placeholder"
description="Description"
message="Message"
icon="account"
name="textarevalue-name"
v-model:value="textarea"
Expand Down

0 comments on commit 64b82dc

Please sign in to comment.