New issue
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
3.0.0 Button.js #632
Merged
alextrastero
merged 34 commits into
react-materialize:3.0.0-beta.0
from
onluiz:3.0.0-beta.0-Button-Component
Dec 14, 2018
Merged
3.0.0 Button.js #632
Changes from 16 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
0d6178d
Merge https://github.com/onluiz/react-materialize into 3.0.0-beta.0-B…
onluiz b8ca981
Add new examples for Buttom component from new materializecss version
onluiz a26904d
Update Floating Action Button docs
onluiz 853d6cd
Remove Floating Action Buttom from Buttom Docs
onluiz 940627f
Remove unused imports from ButtonsPage and Floating Action Buttons Page
onluiz ee27853
Add test for button with small styles applied
onluiz 9f14daf
Update Button from new materializecss version
onluiz 12f62b5
Fix typo in smallButton sample
onluiz ee6b9d7
Fix typo and merge changes
onluiz a72eee0
Remove faicon from FixedActionButton example
onluiz e400c1a
Replace jquery in Button component
onluiz 8dc6790
Add flatbutton to docs
onluiz d53a08b
Add instance destroy for fab button and tooltip
onluiz 93f5a38
Add test for tooltip init and destroy methods
onluiz 08cc808
Fix prettier
onluiz 186dfe1
Fix tooltip prop validation in Button component
onluiz be5c068
Fix Button.spec tests
onluiz ec4764d
Remove package-lock.json
onluiz d275ead
Revert out of context string-helper.js file
onluiz 5c04345
Fix lint
onluiz fbda675
Fix prettier
onluiz 6c70944
Add default value for tooltipOptions in Button component
onluiz 005f87e
Add tests for FloatingActionButton in Button component
onluiz 2247f8a
Refactor instance destroy of button component
onluiz b0756f1
Adds master package-lock.json
onluiz f1455ee
Remove unnecessary condition at Button component
onluiz 589f8f6
Merge button docs
onluiz 614dd1d
Remove nonused page
onluiz 50d8f75
Checkout modal snapshot from beta branch
onluiz 02a39ee
reverting wrong snapshot
onluiz 9b49e92
Merge branch '3.0.0-beta.0' into 3.0.0-beta.0-Button-Component
onluiz fa5d968
Add regenerate snapshot
onluiz 696f65e
revert unwanted changes
alextrastero af5cde6
Revert "revert unwanted changes"
alextrastero File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const capitalize = path => path[0].toUpperCase() + path.substr(1); | ||
|
||
export const addSpaces = path => { | ||
let character = ''; | ||
let newPath = path.charAt(0); | ||
|
||
for (let i = 1; i <= path.length; i++) { | ||
character = path.charAt(i); | ||
if (character === character.toUpperCase()) { | ||
character = ' ' + character; | ||
} | ||
newPath += character; | ||
} | ||
return newPath; | ||
}; | ||
|
||
export const capitalizeAndAddSpaces = (path = '') => { | ||
if (!path) return; | ||
|
||
path = capitalize(path); | ||
path = addSpaces(path); | ||
return path; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import Row from 'Row'; | ||
import Col from 'Col'; | ||
import ReactPlayground from './ReactPlayground'; | ||
import PropTable from './PropTable'; | ||
import Samples from './Samples'; | ||
import ButtonCode from '!raw-loader!Button'; | ||
|
||
import fixedActionButton from '../../../examples/FixedActionButton'; | ||
import horizontalFab from '../../../examples/HorizontalFAB'; | ||
|
||
const FloatingActionButtonsPage = () => ( | ||
<Row> | ||
<Col m={9} s={12} l={10}> | ||
<p className='caption'> | ||
If you want a fixed floating action button, you can add multiple actions that will appear on hover. Our demo is in the bottom righthand corner of the page. | ||
</p> | ||
<h4 className='col s12'> | ||
Fixed Action Button | ||
</h4> | ||
<Col s={12}> | ||
<ReactPlayground code={Samples.fixedActionButton}> | ||
{fixedActionButton} | ||
</ReactPlayground> | ||
</Col> | ||
<h4 className='col s12'> | ||
Horizontal FAB | ||
</h4> | ||
<Col s={12}> | ||
<ReactPlayground code={Samples.horizontalFab}> | ||
{horizontalFab} | ||
</ReactPlayground> | ||
</Col> | ||
<Col s={12}> | ||
<PropTable header='Buttons' component={ButtonCode} /> | ||
</Col> | ||
</Col> | ||
</Row> | ||
); | ||
|
||
export default FloatingActionButtonsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import Button from '../src/Button'; | ||
import Icon from '../src/Icon'; | ||
|
||
export default | ||
<div> | ||
<Button node='a' waves='light' small>Button</Button> | ||
<Button node='a' waves='light' small>Button<Icon left>cloud</Icon></Button> | ||
<Button node='a' waves='light' small>Button<Icon right>cloud</Icon></Button> | ||
</div>; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about an example of a Flat button, corresponding to the one in
materializecss
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.