Skip to content

Conversation

@chaofan232
Copy link
Contributor

@chaofan232 chaofan232 commented Oct 20, 2021

Description

Does this PR introduce a breaking change?

  • Yes
  • No

Manual testing step?

Screenshots (if appropriate):

@chaofan232 chaofan232 linked an issue Oct 20, 2021 that may be closed by this pull request
4 tasks
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #1235 (9fef8ea) into master (616b6fc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1235   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           93        93           
  Lines         1377      1361   -16     
  Branches       344       339    -5     
=========================================
- Hits          1377      1361   -16     
Impacted Files Coverage Δ
src/components/FilePicker/index.jsx 100.00% <100.00%> (ø)
src/components/Accordion/index.jsx 100.00% <0.00%> (ø)
src/components/DatePicker/index.jsx 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 616b6fc...9fef8ea. Read the comment docs.

const FilePicker = ({ filter, dts, placeholder, onSelect, onRemove, isHighlighted, disabled, label }) => {
const fileInputRef = React.useRef();
const [fileName, setFileName] = React.useState('');
const [isFileSelected, setIsFileSelected] = React.useState(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this state is redundant. maybe you can have a look see if you can remove it

"methods": [
{
"name": "usePreventSwipeClicks",
"docblock": "A hook to prevent child click handlers from firing immediately after swiping the Carousel\n\n@returns {object} - handlers to be spread onto any carousel items with `onClick` handlers",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change here?

background-color: $color-disabled;
border: 0;
box-shadow: none;
height: 28px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context for the css change?

Copy link
Contributor Author

@chaofan232 chaofan232 Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the two buttons (X & select) have the different height, so I removed here and added the height into .aui--button selector which can be applied for two buttons for alignment. Should I just leave the style as the same as before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

convert FilePicker to function component

4 participants