如何更改包装React组件的Web组件的样式
我有一个围绕React组件的Web组件。我想更改边界半径的反应组件中有一些div。这是base.tsx中的代码
export abstract class Base extends BaseReactElement {
static get styles() {
return [
unsafeCSS(processCssText(reactStyles)),
unsafeCSS(processCssText(styles)),
css`
:host,
:host > div,
:host > div > div {
display: block;
width: 100%;
}
#test {
border-radius: var(--test-border-radius, 0);
}
。我有Web组件,可以调用围绕base.tsx React组件。调用HS-DIAGOG时,如何更改测试仪 - radius的价值?
I have a web component that wraps around a react component. There are some divs in the react component that I want to change the border radius of. Here's the code in Base.tsx
export abstract class Base extends BaseReactElement {
static get styles() {
return [
unsafeCSS(processCssText(reactStyles)),
unsafeCSS(processCssText(styles)),
css`
:host,
:host > div,
:host > div > div {
display: block;
width: 100%;
}
#test {
border-radius: var(--test-border-radius, 0);
}
I want to change the value of test-border-radius. I have web component that calls which is wraps around Base.tsx React component. How can I change the value of test-border-radius when calling hs-dialog?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论