1. #1
    Sencha User
    Join Date
    Dec 2013
    Posts
    9
    Vote Rating
    0
    yupitz is on a distinguished road

      0  

    Default Unanswered: Shared component with a style

    Unanswered: Shared component with a style


    Hi,
    i have a package with only one component in the src folder (MyButton.js). That's its content

    Code:
    Ext.define('Theme.MyButton', {
        extend: 'Ext.Button',
        xtype:'myButton',
        config:{
            cls:'my-button',
            text: 'my button'
        }
    })

    I would like to give a style to this button, so in the sass/src folder of the package i've created the MyButton.sass file in which i've defined only one css class (just for test)

    Code:
    .my-button{
        background:red;
    }

    The package's folder structure seems like this:
    Code:
    + sass
      + etc
      + src
        + MyButton.sass
      + var
    + src
      + MyButton.js
    I've follow all the guidelines (i think) but when i use the MyButton component into any sencha touch app, it seems like the MyButton.sass has not been compiled/included.


    Can you tell me if i've done something wrong? How can i create a shared component with a css style using packages?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Answers
    3500
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The automatic inclusion of SASS files is not present in Touch, only in Ext JS apps currently.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2013
    Posts
    9
    Vote Rating
    0
    yupitz is on a distinguished road

      0  

    Default


    This could be implemented in a future release?

Thread Participants: 1