Skip to content
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

Elements are incomplete (eg Icons missing from DatePicker) #43

Open
yarnball opened this issue May 18, 2017 · 3 comments
Open

Elements are incomplete (eg Icons missing from DatePicker) #43

yarnball opened this issue May 18, 2017 · 3 comments

Comments

@yarnball
Copy link

yarnball commented May 18, 2017

Thanks for this. Helped out!

How do I get the entire element to appear?

Autocomplete does not display the drop down or tag elements.

I used create-react-app.

T the DatePicker has Chevron Icons within it- but they do not appear
screen shot 2017-05-18 at 3 16 43 pm

This is my package.json:

...
   "toolbox": "react-toolbox-themr"
  },
  "reactToolbox": {
    "include": [
        "BUTTON",
        "DATE_PICKER",
        "FONT_ICON",
        "AUTOCOMPLETE"
    ],
    "customProperties": {
        "animation-duration": "0.3s",
        "color-accent": "var(--palette-pink-a200)",
        "color-accent-dark": "var(--palette-pink-700)",
        "color-primary-contrast": "var(--color-dark-contrast)",
        "color-accent-contrast": "var(--color-dark-contrast)"
    },
    "output": "assets/react-toolbox"
}
import Button from 'react-toolbox/lib/button/Button';
import DatePicker from 'react-toolbox/lib/date_picker/DatePicker';
import FontIcon from 'react-toolbox/lib/font_icon/FontIcon';
import Autocomplete from 'react-toolbox/lib/autocomplete/Autocomplete';

const source = {
  'ES-es': 'Spain',
  'TH-th': 'Thailand',
  'EN-gb': 'England',
  'EN-en': 'USA'
};

class Dashboard extends Component {
  state = {
    countries: ['ES-es', 'TH-th']
  }

  handleChange = (value) => {
    this.setState({countries: value});
  };
  render() {
    return (
    	<div><Button label="Be Humble" raised primary />
<DatePicker/>
      <Autocomplete
        direction="down"
        selectedPosition="above"
        label="Choose countries"
        onChange={this.handleChange}
        source={source}
        value={this.state.countries}
      />
    	</div>
    );
  }
}
@tarnasky
Copy link

@yarnball It looks like you aren't including the Material Design Icons. See the "Roboto Font and Material Design Icons" here:

http://react-toolbox.com/#/install

@cborchert
Copy link

Just to be a bit more explicit about the install process if you're using npm or prefer to include styles through js:

  1. Install the package: npm install -S material-design-icons
  2. In the highest level react component, make sure to include the style: import 'material-design-icons/iconfont/material-icons.css';

Otherwise, you can just include the css in your main html file.

@arefed-zz
Copy link

I have the same problem, and I am including the material-icons.css in my highest level css.

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

No branches or pull requests

4 participants