palantir/blueprint

[InputGroup] Cannot set fill to false

开放

#4,857 创建于 2021年8月14日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
P3Package: coreType: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Environment

  • Package version(s): 3.47.0
  • Operating System: Windows 10
  • Browser name and version: Google Chrome - v92.0.4515.131 (Official Build) (64-bit)

Code Sandbox

Link to a minimal repro: https://codesandbox.io/s/blueprint-sandbox-forked-68yys?file=/src/CoreExample.tsx

Steps to reproduce

  1. Create an InputGroup with fill=true
  2. Create another InputGroup with fill=false
  3. Both inputs look the same

Actual behavior

The fill prop cannot be set to false

Expected behavior

Setting the fill prop to false should make the component not to take up the full width of its container

Possible solution

TBH I'm not sure what's the solution for this one. I tried moving some styles in .bp3-input-group and .bp3-input, but doing so breaks a lot of components that depend on other inputs that are also using those classes (that's something I hate about CSS classes. To me It's so good we have styled-components now 😅)

贡献者指南