We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I am trying to create and override the cds-tab element in my Web Component using Lit 3.
I referred to the Carbon Web Components documentation on using custom styles, but when I tried to implement the same, I encountered issues:
The component renders as "blank" and is not functional. Events, such as clicks, are not working properly. Below is the code for my custom component:
import { css } from 'lit-element'; import { customElement } from 'lit/decorators.js'; import CDSTab from '@carbon/web-components/es/components/tabs/tab.js'; // tried without this also import '@carbon/web-components/es/components/tabs/index.js'; @customElement('to-tab') export class ToTab extends CDSTab { static styles = [CDSTab.styles, css``]; }
When I try to use this component, it doesn't work as expected:
render() { return html` <to-tabs value="tab1" @cds-tabs-selected=${this._handleSelectedTab}> <to-tab id="test" value="test">Test</to-tab> <cds-tab id="tab1" value="tab1"> 1.Tab1 </cds-tab> <cds-tab id="tab2" value="tab2"> 2.Tab2 </cds-tab> <cds-tab id="tab3" value="tab3"> 3.Tab3 </cds-tab> <cds-tab id="tab4" value="tab4"> 4.Tab4 </cds-tab> </to-tabs> `; }
Custom to-tab Issues are that styles are not applied and component event does not working.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Question for Carbon
Hello,
I am trying to create and override the cds-tab element in my Web Component using Lit 3.
I referred to the Carbon Web Components documentation on using custom styles, but when I tried to implement the same, I encountered issues:
The component renders as "blank" and is not functional.
Events, such as clicks, are not working properly.
Below is the code for my custom component:
When I try to use this component, it doesn't work as expected:
Custom to-tab Issues are that styles are not applied and component event does not working.
Code of Conduct
The text was updated successfully, but these errors were encountered: