func (component *Component) setTextAlignment(value interface{}) error {
    alignmentVal, isTextAlignment := value.(cutils.TextAlignment)
    stringVal, isString := value.(string)
    if !isTextAlignment && !isString {
        return fmt.Errorf("could not convert %v to text alignment or string", value)