Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Rounded toggle button issue

未关闭
#121 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
css

调研方向

先从 docs/products/buttons.mdx 和 scss/product/components/_buttons.scss 开始,然后复现构建文档时报告的 TypeError。将报告的 slice 错误追踪到圆角 toggle 示例或其样式,并在该示例能够无错误构建且渲染出预期的圆角 toggle 时视为工作完成。

由索引模型根据 Issue 内容生成。

描述

Signed-off-by: ashishjain [email protected]
Trying to add css for Rounded-Toggle-Button , but error giving --

./docs/products/buttons.mdx
TypeError: (intermediate value).slice is not a function

docs/products/buttons.mdx

### Button group with Toggle
<Playground>
  <h2>Toggle Switch</h2>
    <label class="btn-pill-switch">
             <input type="checkbox" style="display: none;">
                <span class="pill-toggle pill-round ">primary</span>
            </label>
</Playground>

_scss/product/components/buttons.scss

.btn-pill-switch {
position: relative;
display: inline-block;
vertical-align: middle;
width: 48px;
height: 28px;
}

.pill-toggle {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
text-align:center;
padding-top:4px;
background-color: white;
}
.pill-round {
border-radius: 34px;
border:1px solid gray;
}

input:checked + .pill-toggle {
background-color: blue;
color:white;
border:1px solid blue;
}

Attached screenshot for desire result --
Screenshot from 2020-02-13 11-45-40

主要语言
CSS
星标
6
派生
6
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mayadata-io/de-code 的其他 Issue

查看 mayadata-io/de-code 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。