diff --git a/docs/collapse/demo/basic.md b/docs/collapse/demo/basic.md index d392f65bce..c6bf49e4a2 100644 --- a/docs/collapse/demo/basic.md +++ b/docs/collapse/demo/basic.md @@ -13,33 +13,60 @@ --- ````jsx -import { Collapse } from '@alifd/next'; +import { Collapse, Radio } from '@alifd/next'; const Panel = Collapse.Panel; +const RadioGroup = Radio.Group; + +const RTL = 'rtl'; +const LTR = 'ltr'; + +class App extends React.Component { + constructor(props) { + super(props); + this.state = { + rtl: false + } + this.handleDirectionChange = this.handleDirectionChange.bind(this); + } + + handleDirectionChange(v) { + this.setState({ + rtl: !this.state.rtl + }); + } + + render() { + return (
+ + + +
    +
  • Promotions are marketing campaigns ran by Marketplace
  • +
  • Participate to sale your products during that promotion and make a profit
  • +
+
+ +
    +
  • Promotion Products is a service that helps you to promote products you list on Marketplace during a certain time range
  • +
  • You can choose which products should be available for the promotion
  • +
  • Not all Products of you will be available, because Promotions will only attract certain Product areas
  • +
+
+ +
    +
  • The Promotion requires a certain price to make sure that our customers are attracted
  • +
+
+ + Promo Stock is the criteria needed to be followed to be able to join Promotion. With setting particular Promo Stock value you commit to have this amount of stock available while Promotion is active. + +
+
); + } +} ReactDOM.render( - - - - - - - - - - - - Promo Stock is the criteria needed to be followed to be able to join Promotion. With setting particular Promo Stock value you commit to have this amount of stock available while Promotion is active. - - , + , mountNode); ```` diff --git a/docs/loading/demo/basic.md b/docs/loading/demo/basic.md index f1c068be45..63cfe8782d 100644 --- a/docs/loading/demo/basic.md +++ b/docs/loading/demo/basic.md @@ -16,9 +16,20 @@ a basic way to use it ````jsx import { Loading } from '@alifd/next'; -ReactDOM.render( -
test
-
, mountNode); +ReactDOM.render( +
+
LTR + +
test
+
+
+
RTL + +
test
+
+
+
+ , mountNode); ```` ````css diff --git a/src/collapse/collapse.jsx b/src/collapse/collapse.jsx index 8cda751cf7..16221b02ef 100644 --- a/src/collapse/collapse.jsx +++ b/src/collapse/collapse.jsx @@ -45,7 +45,8 @@ class Collapse extends React.Component { */ accordion: PropTypes.bool, children: PropTypes.node, - id: PropTypes.string + id: PropTypes.string, + rtl: PropTypes.bool, }; static defaultProps = { @@ -192,7 +193,7 @@ class Collapse extends React.Component { } render() { - const {prefix, className, style, disabled, dataSource, id} = this.props; + const {prefix, className, style, disabled, dataSource, id, rtl} = this.props; const collapseClassName = classNames({ [`${prefix}collapse`]: true, [`${prefix}collapse-disabled`]: disabled, @@ -201,7 +202,7 @@ class Collapse extends React.Component { const others = obj.pickOthers(Collapse.propTypes, this.props); return ( -