Git Product home page Git Product logo

doom-bootstrap's Introduction

doom-bootstrap

Samples here

doom-bootstrap's People

Contributors

andywhite37 avatar fponticelli avatar mlms13 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

doom-bootstrap's Issues

Component conventions

What if all BS components followed a common convention for the "create" functions:

public static function create(required api values, ?optional api values, required state values, ?optional state values, ?api, ?state, ?children) {
  // construct
}

So a button might look like:

class Button extends Component<ButtonApi, ButtonState> {
  public static function create(onClick, buttonStyle, ?buttonSize, ?api, ?state, ?children) : Button {
    if (api == null) api = /* create default api obj */;
    api.onClick = onClick;
    // optional api things

    if (state == null) state = /* create default state obj */;
    state.style = buttonStyle;
    // etc.

    return new Button(api, state, children);
  }
}

Components

I thought it would be useful to have a list of components to implement...

General stuff

Bootstrap components

  • Button
  • ButtonGroup
  • ButtonDropdown
  • Form
  • InputGroup
  • Dropdown
  • Jumbotron
  • Label
  • Alert
  • Card
  • Nav
  • Navbar
  • Breadcrumb
  • Pagination
  • Progress
  • ListGroup
  • Modal
  • Scrollspy
  • Tooltip
  • Popover
  • Collapse
  • Carousel
  • utility classes? not sure if these are components, or are options for certain components? http://v4-alpha.getbootstrap.com/components/utilities/

What's the best way to attach arbitrary things to Components

E.g. if you have a Button component which has it's own state object, the render method only has access to the values defined in state. What if you wanted to add your own custom class to the button component?

Should all component state typedefs extend from a common base "state" for components, which allows for extra things like classes, attributes, id, etc.?

typedef ComponentState = {
  classes: String,
  id: String,
  attributes: Map<String, AttributeValue>,
  // ?
};

// then for something like Button:
typedef ButtonState = { > ComponentState,
  style: ButtonStyle,
  size: ButtonSize,
  // etc.
}

You could also do the same type of thing for APIs, so common events don't have to be duplicated?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.